package com.zjq.designpatterns.behaviors.status.code;/*
 * 版权信息: 北京千⾥马网信科技有限公司</br>
 * Copyright ©2008-2018. All rights reserved. 京ICP备16007318号
 */

/**
 * @author jessie
 * @version 1.0
 * @date 2021/1/28
 */
public class Test {
    public static void main(String[] args) {
        CourseVideoContext courseVideoContext = new CourseVideoContext();
        courseVideoContext.setCourseVideoState(new PlayState());
        System.out.println("当前的状态:"+courseVideoContext.getCourseVideoState()
                .getClass().getSimpleName());//获取类名
        courseVideoContext.pause();
        System.out.println("当前的状态:"+courseVideoContext.getCourseVideoState()
                .getClass().getSimpleName());//获取类名
        courseVideoContext.speed();
        System.out.println("当前的状态:"+courseVideoContext.getCourseVideoState()
                .getClass().getSimpleName());//获取类名
        courseVideoContext.stop();
        System.out.println("当前的状态:"+courseVideoContext.getCourseVideoState()
                .getClass().getSimpleName());//获取类名
        //不能快进
        courseVideoContext.speed();
        System.out.println("当前的状态:"+courseVideoContext.getCourseVideoState()
                .getClass().getSimpleName());//获取类名
    }
}
